
#pragma once

#include "base/core/singleton.h"
#include "Common/TableDefine.h"


class TargetSaleCfg : public ManualSingleton <TargetSaleCfg>
{
	friend ManualSingleton <TargetSaleCfg>;
public:
	TargetSaleCfg();
	~TargetSaleCfg();
	bool Init(const char *szCfgFile, const char *szSplitChar);
	bool UnInit();
	void Clear();
	const TargetSaleCfgInfo *GetTargetSaleCfgInfo(int32_t id);
	const TargetSaleCfgMap *GetTargetSaleCfgMap() { return &m_TargetSaleCfgMap; }
private:
	TargetSaleCfgMap m_TargetSaleCfgMap;
};

#define  g_MakeTargetSaleCfgTable() (TargetSaleCfg::Instance())
#define  g_GetTargetSaleCfgTable() (TargetSaleCfg::GetInstance())
#define  g_DelTargetSaleCfgTable() (TargetSaleCfg::Destroy())